
import java.util.ArrayList;



/**
 *
 * Compiler: jdk1.6.0_14 <br />
 * IDE: NetBeans 6.7.1 <br />
 * @author Andrew Smith <br />
 */
public class Creator
{




    public static final String start = "private static final double ";

    public static final double INC = 8;
    public static final double name_inc = 180/INC; 

    public static final String DEGREE_INC = "Math.PI / " + INC;

    public static final String name = "DEGREE_";




    public static void main(String[] args)
    {
        ArrayList<String> enums = new ArrayList<String>();

        String finalResult = "";

        //adds the first one which is always zero
        finalResult += start + name + "0 = 0;\n";
        enums.add(name + "0");
        double current_name_inc = 0;
        //goes through the first (positive) of the degrees
        for(int i=0; i<INC-1; i++)
        {
            int z = i+1;
            current_name_inc += name_inc;
            int num = (int) Math.ceil(current_name_inc);
            finalResult += start + name + num + " = " + "DEGREE_INC" + " * " + z + ";\n" ;
            enums.add(name + num);
            
        }

        current_name_inc += name_inc; //this should now equal 180
        finalResult += start + name + "180 = Math.PI;\n";
        enums.add(name + "180");

        for(int i=(int) (INC - 1); i>0; i--)
        {
            current_name_inc += name_inc;
            int num = (int) Math.ceil(current_name_inc);
            finalResult += start + name + num + " = 0 - (" + "DEGREE_INC" + " * " + i + ");\n" ;
            enums.add(name + num);
        }
        System.out.println(finalResult);

        System.out.println();
        for(int i=0; i<enums.size(); i++)
        {
            System.out.print(enums.get(i) + ", ");
        }
        System.out.print(";");
        System.out.println();

    }

}
